articles

Home / DeveloperSection / Articles / Set Primary key in Access table

Set Primary key in Access table

AVADHESH PATEL31260 01-Apr-2013

Microsoft Access table has a field or set of fields that uniquely identify each record stored in the table, it can be set as the primary key. The selection of a primary key is one of the most critical decisions you’ll make in the design of a new database. In this article I have explained how to set primary key in table.

Set Primary key
 

Step 1: Open a table in Design view.

Step 2: Select the field or fields you want to define as the primary key or click the row selector for the desired field.

Step 3: Click Primary Key on the toolbar.

Figure 1:

Set Primary key in Access table

After clicking on primary key, selected column will be look as below image

Figure 2:

Set Primary key in Access table

Note: - When you save a new table without setting a primary key, Access prompts you to create one. If you choose Yes, Access creates an ID field that uses the AutoNumber data type to provide a unique value for each record. If your table already includes an AutoNumber field, Access uses that field as the primary key.


Updated 06-Jun-2020
Avadhesh Kumar Patel District Project Manager - Aligarh 14 months work experience in Panchayati Raj Department Sector as District Project Manager & 12 months work experience in IT Sector as Software Engineer. :-)

Leave Comment

Comments

Liked By